//
//  SiDatePickerVC.swift
//  SiliUtility
//
//  Created by Li Dong on 2023/10/17.
//

import UIKit

class SiDatePickerVC: UIViewController {
    
    @IBOutlet weak var whiteView: UIView!
    
    @IBOutlet weak var datePicker: UIDatePicker!
    
    var callBack:((Date) -> Void)?

    override func viewDidLoad() {
        super.viewDidLoad()

        view.backgroundColor = .black.withAlphaComponent(0.5)
        datePicker.locale = Locale(identifier: "zh_CN")
    }

    @IBAction func closeHandler(_ sender: Any) {
        dismiss(animated: true)
    }
    
    @IBAction func okHandler(_ sender: Any) {
        dismiss(animated: true)
        callBack?(datePicker.date)
    }
    
    
    
}
